//
//  ViewController.swift
//  swift 函数重载
//
//  Created by 龚昕炜 on 16/7/27.
//  Copyright © 2016年 龚昕炜. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    
    lazy var person: Person = {
        return Person(name: "123", age: 20)
    }()
    
    let closure = { () -> (Person) in
        return Person(name: "234", age: 21)
    }
    
    lazy var person1: Person = self.closure()
    
    lazy var person2 = { ()->Person in
        return Person(name: "345", age: 22)
    }
    
    lazy var person3 = Person(name: "456", age: 23)

    override func viewDidLoad() {
        super.viewDidLoad()

        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

